import Vue from 'vue'

import 'normalize.css/normalize.css' // A modern alternative to CSS resets

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import locale from 'element-ui/lib/locale/lang/zh-CN' // lang i18n

import '@/styles/index.scss' // global css

import App from './App'
import store from './store'
import router from './router'

import VueClipboard from 'vue-clipboard2'
Vue.use( VueClipboard )

// 懒加载
import VueLazyload from 'vue-lazyload'
Vue.use(VueLazyload, {
  preLoad: 1,
  error: require('./assets/images/no.png'),
  loading: require('./assets/images/nomore.jpg'),
  attempt: 1,
  listenEvents: ['scroll', 'wheel', 'mousewheel', 'resize', 'animationend', 'transitionend', 'touchmove']
})

import '@/icons' // icon
import '@/permission' // permission control

import FormCreate from '@form-create/element-ui'
Vue.use(FormCreate);




import modalForm from '@/libs/modal-form'
import { modalSure } from '@/libs/common'
Vue.prototype.$modalForm = modalForm
Vue.prototype.$modalSure = modalSure

Vue.use(ElementUI, { locale })

Vue.config.productionTip = false

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
